package com.ews.onlineexchange.controller;

import javax.enterprise.inject.Model;
import javax.faces.context.FacesContext;
import javax.inject.Inject;

import org.apache.commons.lang3.StringUtils;

import com.ews.onlineexchange.dao.ServiceSupplierDao;
import com.ews.onlineexchange.model.ServiceSupplier;

@Model
public class ServiceSupplierController {
	
	@Inject
	ServiceSupplierDao serviceSupplierDao;
	
	private String seqNo;
	private ServiceSupplier serviceSupplier;
	
	public void init() {
		if (!StringUtils.isBlank(getSeqNo()))
			serviceSupplier = serviceSupplierDao.findBySeqNo(getSeqNo());
	}

	public String getSeqNo() {
		return seqNo;
	}

	public void setSeqNo(String seqNo) {
		this.seqNo = seqNo;
	}

	public ServiceSupplier getServiceSupplier() {
		return serviceSupplier;
	}

	public void setServiceSupplier(ServiceSupplier serviceSupplier) {
		this.serviceSupplier = serviceSupplier;
	}	
	
}
